import type { Component } from 'vue'
import type { RouteRecordRaw } from 'vue-router'

function Layout(): Component {
  return import('@/layouts/index.vue')
}

const routes: RouteRecordRaw = {
  path: '/inventoryManagement',
  component: Layout,
  redirect: '/inventoryManagement/page', // 添加重定向
  name: 'inventoryManagement',
  meta: {
    title: '库存管理',
    icon: 'i-ep:HomeFilled',
    hidden: true,
  },
  children: [
    {
      path: 'page',
      component: () => import('@/views/inventoryManagement/inventoryManagement.vue'),
      name: 'inventoryManagementPage',
      meta: {
        title: '库存管理',
        icon: 'i-ep:HomeFilled',
        hidden: true,
      },
    },
  ],
}

export default routes
